QuickTime 4 API Documentation

Inside Macintosh: QuickTime

Previous | Overview | Contents

Alignment Functions

Your application can use alignment functions to specify the alignment in any of the Image Compression Manager's alignment functions (described in "Aligning Windows," ). You call the alignment function with a rectangle (defined in global screen coordinates) that has already been aligned using the default behavior. The alignment function then has the option of applying some additional alignment criteria to the rectangle, such as vertical alignment of some form. In the case of supporting hardware alignment, it is the function's responsibility to determine if the rectangle applies to the relevant device.

The AlignmentProcPtr data type defines a pointer to an alignment function. You assign an alignment function by passing a pointer to the alignment function structure, which identifies the alignment function to the appropriate function.

/* alignment function structure */
typedef struct
{
    ICMAlignmentUPP         alignmentProc;          /* pointer to your
                                                        alignment function */
    long                    alignmentRefCon;        /* reference constant */
} ICMAlignmentProcRecord, *ICMAlignmentProcRecordPtr;
alignmentProc
Points to your alignment function.

alignmentRefCon
Contains a reference constant for use by your alignment function.

MyAlignmentProc

Your alignment function should have the following form:

pascal void MyAlignmentProc (Rect *rp, long refcon);
rp
Contains a pointer to a rectangle that has already been aligned with a default alignment function.

refcon
Contains a reference constant value for use by your alignment function. Your application specifies the value of this reference constant in the alignment function structure you pass to the Image Compression Manager.


© 1999 Apple Computer, Inc.

Previous | Overview | Contents